Example of Attributes in Logic

An appliance manufacturer’s model contains an assembly location to join lids to pots. The pots are either aluminum or steel and both types of pots arrive at the same assembly location. If an aluminum pot arrives at the assembly location, it must be joined with an aluminum lid. The same is true for a steel pot and lid. The entities, steel_lids and alum_lids, are waiting at a queue to be joined to the pots.

Obviously, one way to model the different pot types is to use two different entity types. This example shows how to achieve the same effect using a single entity type (pot) with an attribute designating whether it is steel or aluminum.

An attribute called "type," defined in the attribute edit table, allows the location to tell what type of pot has arrived at the assembly location. We will use a value of 1 to represent a steel pot and a value of 2 to represent an aluminum pot. When a steel pot enters the system, we assign a value of 1 to the attribute TYPE with the statement TYPE=1. When an aluminum pot enters the system, we set its type to 2.

At the assembly location, we use the following logic:

 

This logic checks the type of the pot and then joins a lid according to that type.